package com.example.hp.entity;


import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * (Courses)实体类
 *
 * @author makejava
 * @since 2024-12-15 16:48:38
 */
public class Courses implements Serializable {
    private static final long serialVersionUID = -86342899885515328L;
    @NotNull(message = "id不能为空")
    @Min(value = 1,message = "id不能小于1")
    @Schema(description = "id")
    private Integer courseId;
    @NotBlank(message = "名称不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9f5a]{2,20}$", message = "name内容不正确")
    @Schema(description = "名称")
    private String courseName;
    @NotBlank(message ="课程描述不能为空")
    private String courseDescription;
    @NotBlank(message ="课程日期不能为空")
    private Integer courseDuration;
@NotBlank(message ="价格不能为空")
    private Double coursePrice;


    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseDescription() {
        return courseDescription;
    }

    public void setCourseDescription(String courseDescription) {
        this.courseDescription = courseDescription;
    }

    public Integer getCourseDuration() {
        return courseDuration;
    }

    public void setCourseDuration(Integer courseDuration) {
        this.courseDuration = courseDuration;
    }

    public Double getCoursePrice() {
        return coursePrice;
    }

    public void setCoursePrice(Double coursePrice) {
        this.coursePrice = coursePrice;
    }

}

